package com.zjitc.pigspring.common;

import com.zjitc.pigspring.utils.RedisUtil;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class RedisAspect {

    @Autowired
    private RedisUtil redisUtil;

    @Before("@annotation(redisSetNull)")
    public void beforePrintMessage(RedisSetNull redisSetNull) {
        // 获取注解属性的值
        redisUtil.set(redisSetNull.message(),null);

    }
}
